public class Test {
    public static void main(String[] args){
        int i = 1;
        int count = 0;
        while (i <= 100){
            if (i % 10 == 9)
                count++;
            if (i / 10 == 9)
                count++;
            i++;
        }
        System.out.println(count);
    }
}

